Skip to content

fix: fullscreen overlay bugs (remounts, stacking, shortcuts, scroll lock, mobile) - #28

Merged
mishraprayash merged 2 commits into
mainfrom
fix/fullscreen-overlays
Nov 2, 2026
Merged

mishraprayash merged 2 commits into
mainfrom
fix/fullscreen-overlays

Conversation

@mishraprayash

Copy link
Copy Markdown
Owner

Bugs fixed

SplitPanesView (json, diff-checker, jwt, encoder, xml-json, yaml-json)

  1. Toggling fullscreen wiped pane state. Fullscreen rendered through createPortal while normal mode rendered inline, so React remounted both panes on every toggle. That lost search terms and matches, tree collapse state, scroll position, caret and undo history. The overlay now renders in place with the same element tree in both modes.
  2. F hijacked ⌘F / Ctrl+F (browser find) whenever focus wasn't in a text field. It also fired on <select>, on key auto-repeat, during IME composition, and while another modal was open. All of these are now ignored.
  3. Modals and toasts opened hidden behind the overlay (overlay z-[100], modals and toasts z-50). Copy toasts never showed, and ⌘K focused an invisible command palette. The overlay now sits at z-[45]: above the header (z-40), below modals and toasts.
  4. One Esc closed a modal and exited fullscreen. Modal now calls preventDefault() on Escape, and fullscreen ignores Escape events that were already handled.
  5. Body scroll lock clobbered other locks. It always reset overflow to '', and could leave the page stuck after a modal restored a stale hidden. It now saves and restores the previous value, and only while fullscreen.
  6. Panes clipped content on mobile and short screens. Below lg the overlay now scrolls. On lg the panes scroll internally instead of being overflow-hidden.
  7. Dropped the animate-in fade-in zoom-in-95 classes, which don't exist in this project, in favor of the existing animate-fade-in.

SQL Designer
8. Esc didn't exit fullscreen and the page behind kept scrolling. It now uses the same shared hook.
9. h-screen (100vh) on a fixed inset-0 overlay ran under mobile browser toolbars. Removed.
10. On mobile, fullscreen clipped the export editor. Rows now have explicit heights and the overlay scrolls.
11. The diagram wasn't re-fitted after toggling, so it stayed tiny in the corner or ended up off-screen. It now calls fitView after the resize.

Shortcuts sheet now documents F / Esc for fullscreen.

Shared logic lives in the new src/lib/hooks/useFullscreenOverlay.ts (Esc-to-close + save/restore body scroll lock).

Testing

  • tsc is clean, eslint src has 0 errors and no new warnings, and vitest passes.
  • Manually checked in the dev server:
    • JSON tool search text and match survive entering fullscreen.
    • F toggles fullscreen, and a synthetic ⌘F is not intercepted.
    • ⌘K palette renders above the overlay; the first Esc closes the palette only, the second exits fullscreen.
    • Body overflow is restored after exit.
    • SQL designer: the overlay fills the viewport at z-45, Esc exits, and overflow is restored.

🤖 Generated with Claude Code

mishraprayash and others added 2 commits November 2, 2026 22:19
- Add useFullscreenOverlay hook: Esc-to-close on window (skips events
  already handled via defaultPrevented) and body scroll lock that saves
  and restores the previous overflow value; inert while closed.
- SplitPanesView: drop createPortal/mounted so toggling fullscreen keeps
  the same element tree (panes no longer remount and lose search, scroll,
  collapse and undo state). A single wrapper switches to a fixed z-[45]
  overlay (above header z-40, below modals/toasts z-50) with role=dialog,
  aria-modal and an opacity-only fade (the animate-in/zoom-in classes did
  not exist). Below lg the overlay scrolls naturally; on lg the panes fill
  the viewport 50/50 and scroll internally.
- SplitPanesView "f" shortcut: ignore modifier keys (stops hijacking
  Cmd/Ctrl+F), key repeat, IME composition, already-handled events,
  focus in input/textarea/select/contenteditable, and other open
  aria-modal dialogs.
- Modal: preventDefault on Escape so one Esc closes the modal without
  also exiting fullscreen.
- SQL designer: use the shared hook (adds Esc + scroll lock), z-50 ->
  z-[45], drop h-screen (100vh overflows under mobile toolbars), make the
  overlay scroll below lg with explicit 70dvh/80dvh rows so the export
  editor is not clipped (lg layout unchanged), re-fit the diagram after
  toggling, and use a functional state update for the toggle.
- ShortcutsModal: document F (toggle fullscreen) and Esc (exit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web-tools Building Building Preview Nov 2, 2026 4:38pm UTC

@mishraprayash
mishraprayash merged commit bd970f3 into main Nov 2, 2026
1 of 2 checks passed

This branch was successfully deployed

1 active deployment
Preview — e9446050 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant